use chrono::NaiveDateTime;
use sea_orm::FromQueryResult;
use serde::{Deserialize, Serialize};

#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct TurnoverReportVO {
    pub date_list: Vec<NaiveDateTime>,
    pub turnover_list: Vec<f64>,
}

#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct UserReportVO {
    pub date_list: Vec<NaiveDateTime>,
    pub total_user_list: Vec<i64>,
    pub new_user_list: Vec<i64>,
}

#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct OrderReportVO {
    // 日期
    pub date_list: Vec<NaiveDateTime>,
    // 日单数
    pub order_count_list: Vec<i64>,
    // 有效单数
    pub valid_order_count_list: Vec<i64>,

    // 总数
    pub total_order_count: usize,
    //有效订单数
    pub valid_order_count: usize,
    //订单完成率
    pub order_completion_rate: f64,
}

#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SalesTop10ReportVO {
    pub name_list: Vec<String>,
    pub num_list: Vec<i64>,
}
#[derive(Debug, Deserialize, Serialize, FromQueryResult)]
pub struct GoodsSalesDTO {
    pub name: String,
    pub number: i64,
}
